<%--=========================================================================== 
This is the page directive. Sets the content type and encoding.
Encoding of the response: UTF-8
Encoding of this JSP page: Cp1251 
===========================================================================--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="Cp1251"%>
<%@ taglib uri="/WEB-INF/st4" prefix="st"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Destination</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="styles/st4.css" />
</head>
<body>
	<table class="page">
		<%--========================================================================--%>
		<jsp:include page="/WEB-INF/includes/header.jsp" />
		<jsp:include page="/WEB-INF/includes/menu.jsp" />
		<%--========================================================================--%>
		<tr class="content">
			<td align="center">

					<h2>
						<st:i18n key="pages.my_orders"/>
					</h2>
					<table class="table" style="width:855px;">
						<tr>
							<td style="width:475px;" ><st:i18n key="pages.flight" /></td>
							<td style="width:290px;"><st:i18n key="pages.additional_service" /></td>
							<td style="width:70px;"><st:i18n key="pages.total" /></td>
						</tr>
						</table><br/>
						<c:forEach var="item" items="${tickets}">
						<table class="table" style="width:855px;">
							<tr> 
								<td colspan=5 > Ticket # ${item.getId()} bought ${item.getPurchaseDate()}
								</td>
							</tr>
							<tr>
								<td style="width:475px;">
									<c:forEach items="${item.getFlights()}" var="flight">
										${flight.getFlightDate()}, ${flight.getSchedule().getShortDescription()}<br/>
									</c:forEach>
								</td>
								<td style="width:290px;">
									<table style="color: white;">
										<c:forEach items="${item.getServices()}" var="service">
											<tr>
												<td style="width: 210px;"><st:i18n key="additional_services.id_${service.id}" /></td>
												<td style="text-align: center; width: 85px;">${service.price}$</td>
											</tr>
										</c:forEach>
									</table>
								<td style="width:70px;">${item.getPrice()}$</td>
							</tr>
						</table>
						<br/>
						</c:forEach>
			</td>
		</tr>
		<%--========================================================================--%>
		<jsp:include page="/WEB-INF/includes/footer.jsp" />
		<%--========================================================================--%>

	</table>
</body>
</html>